<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="com.yy.base.util.UserUtil"%>
<%
if (session.getAttribute(UserUtil.USERSESSION) == null) {
	response.sendRedirect(request.getContextPath());
	return;
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>数据采集</title>
	<meta charset="utf-8" />
	<meta name="renderer" content="webkit" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	<script src="../../script/mes-import.js"></script>
	<script src="js/dataCollection.js"></script>
</head>
<body style="padding: 10px;" id="manuDataCollection">
<form class="layui-form" lay-filter="myForm" style="float: left;">
	<div class="layui-form-item">
		<div class="layui-input-inline">
			<label class="layui-form-label" style="text-align: right;">RFID：</label>
			<div class="layui-input-block">
				<input type="text" id="code" v-model="code" readLocaRfid="scanRfidQuery()" autocomplete="off" placeholder="请扫描RFID" class="layui-input">
			</div>
		</div>
		<div class="layui-input-inline" id="userCodePanel" style="display: none;">
			<label class="layui-form-label" style="text-align: right;">工号：</label>
			<div class="layui-input-block">
				<input type="text" name="userCode" id="userCode" v-model="userCode" autocomplete="off" placeholder="请扫描员工工号" class="layui-input">
			</div>
		</div>
		<!--<div class="layui-input-inline" style="width: 15%">
			<label class="layui-form-label" style="text-align: right;">扫描自动报工：</label>
			<div class="layui-input-block">
				<input type="checkbox" name="autoWork" lay-skin="switch" lay-filter="autoWork" lay-text="开|关" />
			</div>
		</div>-->
	</div>

	<div class="layui-form-item" id="orderInfoPanel" style="display: none;">
        <label class="layui-form-label"></label>
        <div class="layui-input-block" id="orderInfo" style="background-color: #cccccc;padding: 10px;line-height: 25px;">工单信息</div>
    </div>
    <div class="layui-form-item" style="display: none;">
		<div class="layui-input-inline">
			<label class="layui-form-label">当前工序：</label>
			<div class="layui-input-block">
				<select name="processId" id="processId" v-model="processId" style="max-width: 400px;">
					<option value="">--请选择--</option>
					<option v-for="p in processList" value="{{p.emes_process_id}}">{{p.name}}</option>
				</select>
			</div>
		</div>
    </div>
	<div class="row" id="facInputPanel" style="display: none;">
		<div class="layui-form-item">
			<div class="layui-input-inline">
				<label class="layui-form-label">设备编码:</label>
				<div class="layui-input-block">
					<input id="facCode" name="facCode" placeholder="请扫描设备编码" autocomplete="off" class="layui-input"/>
				</div>
			</div>
			<div class="layui-input-inline" id="facInfoPanel">
				<label class="layui-form-label"></label>
				<div class="layui-input-block" id="facInfo"></div>
			</div>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-inline">
			<label class="layui-form-label">备注：</label>
			<div class="layui-input-block">
				<textarea id="description" style="width: 400px;height: 60px;padding: 5px;" placeholder="此处填写备注信息"></textarea>
			</div>
		</div>
	</div>
</form>
<div style="float: left;">
	<div style="padding: 10px;">
		<button class="layui-btn" id="startBtn" style="width: 111px;margin-right: 20px;" type="button" onclick="submitData('START')">开工</button>
		<button class="layui-btn" id="defaultBtn" style="width: 111px;margin-right: 20px;display: none;" type="button" onclick="submitData('true')">报工</button>
		<button class="layui-btn" id="finishBtn" style="width: 111px;display: none;" type="button" onclick="submitData('FINISHED')">完工</button>
	</div>
	<div style="padding: 10px;display: none;" id="sopBtnDiy">
		<button type="button" style="width: 111px;background-color: #F3982B;" class="layui-btn" onclick="openSop()">工艺指导文件</button>
	</div>
	<div style="padding: 10px;">
		<button type="button"  style="width: 111px;background-color: #FF5722;" class="layui-btn">异常上报</button>
	</div>
</div>
<form class="layui-form" lay-filter="dataForm" style="clear: both;">
	<div class="tabs ipad" id="data_tab">
		<ul id="data_tab_title"></ul>
	</div>
</form>
</body>
</html>